
package global.com.loansapplication.ui.adapter;

import android.content.Context;

import com.superrecycleview.superlibrary.adapter.BaseViewHolder;
import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter;

import java.util.List;

import global.com.loansapplication.R;

/**
 * Created by super南仔 on 2017-05-09. 类备注： 需要传入的参数:
 */
public class LocationHeaderAdapter extends SuperBaseAdapter<String> {

    public LocationHeaderAdapter(Context context, List<String> data) {
        super(context, data);
    }

    @Override
    protected void convert(BaseViewHolder holder,final String item, int position) {
        holder.setText(R.id.tvName, item);
//        /**
//         * 设置可以非滑动触发的开启菜单
//         */
//        holder.getView(R.id.tvName).setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                EventBus.getDefault().post(new CityEvent(item));
//            }
//        });
//        holder.getView(R.id.tvName).setOnLongClickListener(new View.OnLongClickListener() {
//            @Override
//            public boolean onLongClick(View view) {
//                EventBus.getDefault().post(new DelectEvent(item));
//                return false;
//            }
//        });


    }

    @Override
    protected int getItemViewLayoutId(int position, String item) {
        return R.layout.view_city_header;
    }
}
